package jeconbond.economic.market.strategy;

import jeconbond.economic.resources.IResourceType;

public class MultiplyPerformPriceStrategy implements IPerformPriceStrategy {
	private IPerformPriceStrategy substrategy;
	private double agentGreedPercent;

	public MultiplyPerformPriceStrategy(
			IPerformPriceStrategy substrategy,
			double agentGreedPercent
	) {
		this.substrategy = substrategy;
		this.agentGreedPercent = agentGreedPercent;
	}

	@Override
	public double performPrice(IResourceType resourceType) {
		double subPrice = substrategy.performPrice(resourceType);
		subPrice *= agentGreedPercent;
		return subPrice;
	}
}
